<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06_JS函数</title>
</head>
<body>
<button onclick="alert('你是在迪赛')">弹出警告框</button>
<button onclick="confirm('你确定吗?')">弹出确认框</button>
<button onclick="prompt('请输入会员卡号：')">弹出提示输入框</button>
<script>
    function f1(){
          console.log("函数")
    }
    f1()

    function f2(n){
        console.log("f2函数"+n)
    }
    f2('今天中午吃什么');
    f2(888);
    f2(false);

    function  f3(x,y){
        console.log(x+y);
    }
    f3(1,2);
    f3(1);
    f3(3,2,1);

    function f4(){
        console.log(arguments);
    }
    f4(50);
    f4(50,60);
    f4(50,60,70);

    function f5(a,b){
        return a+b;
    }
    var res = f5(3,4);
    console.log(res);
    console.log(f5(3,4));



    var  f6 = function (){
        console.log('f6')
    }
    console.log(f6);
    console.log(typeof f6);

    var f7 = (n)=>{
        console.log('箭头函数'+n);
    }
    f7('你好');

</script>

</body>
</html>